/*
 * @Descripttion:
 * @Author: liang
 * @Date: 2021-04-20 11:15:47
 * @LastEditors: cuiyingchun
 * @LastEditTime: 2022-11-06 02:53:28
 */
import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: () => import('@/views/home.vue'),
    redirect: {
      name: 'index'
    },
    children: [
      {
        path: '/index',
        component: () => import('@/views/index.vue'),
        name: 'index',
        meta: {
          title: '首页'
        }
      },
      {
        path: '/questionAnswer',
        component: () => import('@/views/ruralClassroom/questionAnswer/questionAnswer.vue'),
        name: 'questionAnswer',
        meta: {
          title: '招采问答'
        }
      },
      {
        path: '/consultingService',
        component: () => import('@/views/ruralClassroom/questionAnswer/consultingService.vue'),
        name: 'consultingService',
        meta: {
          title: '咨询页'
        }
      },
      {
        path: '/rfquestionAnswer',
        component: () => import('@/views/ruralClassroom/questionAnswer/rfquestionAnswer.vue'),
        name: 'rfquestionAnswer',
        meta: {
          title: '乡农问答'
        }
      },
      {
        path: '/experts',
        component: () => import('@/views/ruralClassroom/experts/list.vue'),
        name: 'experts',
        meta: {
          title: '专家风采'
        }
      },
      {
        path: '/expertview',
        component: () => import('@/views/ruralClassroom/experts/view.vue'),
        name: 'expertview',
        meta: {
          title: '专家详情'
        }
      },
      {
        path: '/classroom',
        component: () => import('@/views/ruralClassroom/classroom/list.vue'),
        name: 'classroom',
        meta: {
          title: '乡农课堂'
        }
      },
      {
        path: '/classroom/searchshow',
        component: () => import('@/views/ruralClassroom/classroom/searchshow.vue'),
        name: 'searchshow',
        meta: {
          title: '乡农课堂'
        }
      },
      {
        path: '/classroom/view',
        component: () => import('@/views/ruralClassroom/classroom/view.vue'),
        name: 'classroomview',
        meta: {
          title: '乡农课堂'
        }
      },
      {
        path: '/perCenter/view',
        component: () => import('@/views/ruralClassroom/perCenter/view.vue'),
        name: 'perCenter',
        meta: {
          title: '个人中心'
        }
      }
    ]
  }

]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
